/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ortus;

import gkusnick.sagetv.api.API;
import gkusnick.sagetv.api.MediaFileAPI;


import sagex.api.AiringAPI;

/**
 *
 * @author Aaron
 */
public class sjq {
	public static boolean IsMediaFileComskipped(MediaFileAPI.MediaFile mf){
		return ortus.api.IsMediaFileComskipped(UnwrapMediaFile(mf));
	}

	public static boolean test1(MediaFileAPI.MediaFile mf){
		return true;
	}

	public static boolean test2(Object obj){
		return Integer.parseInt((String)obj) == 100;
	}

	public static boolean test3(MediaFileAPI.MediaFile mfwrapped){
		Object mf = UnwrapMediaFile(mfwrapped);
		return AiringAPI.GetAiringTitle(mf).equals("Chuck");
	}

	public static boolean test3a(Object mfunwrapped){
		return test3(WrapMediaFile(mfunwrapped));
	}

	public static boolean test3b(Object mfwrapped){
		return test3((MediaFileAPI.MediaFile)mfwrapped);
	}

	private static Object UnwrapMediaFile(MediaFileAPI.MediaFile mfwrapped){
		//API sageapi = new API();
		MediaFileAPI mfapi = new MediaFileAPI(new API());
		return mfapi.Unwrap(mfwrapped);
	}

	private static MediaFileAPI.MediaFile WrapMediaFile(Object mfunwrapped){
		MediaFileAPI mfapi = new MediaFileAPI(new API());
		return mfapi.Wrap(mfunwrapped);
	}
}
